package edu.cuit.avatar.decorator;

/**
 * 具体装饰构件角色
 * @author <a href="mailto:1020zhaodan@163.com">Adan</a>
 * @version 1.0
 * @date 2025/7/12 14:42
 */
public class FilterMessageBoard implements MessageBoard{
    //待装饰的具体构件角色
    private MessageBoard target;

    public FilterMessageBoard(MessageBoard target) {
        this.target = target;
    }

    @Override
    public String message() {
        String message = target.message();
        //进行装饰,添加功能
        return message.replace("三民主义", "一国两制");
    }
}
